/*
 ***********************************************************************************************************************
 *
 *  Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 *
 **********************************************************************************************************************/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!
//
// This code has been generated automatically. Do not hand-modify this code.
//
// When changes are needed, modify the tools generating this module in the tools\internal\MCBP directory.
//
// WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING!  WARNING! WARNING!  WARNING!  WARNING!  WARNING!
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once
#include "core/hw/gfxip/gfx6/gfx6Device.h"
#include "core/hw/gfxip/gfx6/gfx6CmdStream.h"

namespace Pal
{
namespace Gfx6
{
// =====================================================================================================================
// Initialize several structures with the ClearState values, the Set registers are the same as ContextShadowRange.
void InitializeContextRegistersGfx6(
    CmdStream*     pCmdStream,
    uint32         numRegPairs,
    const uint32*  pRegOffsets,
    const uint32*  pRegValues)
{
    constexpr uint32 DbRenderControlGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScWindowOffsetGfx6[] = {
        0x0       ,
        0x80000000,
        0x40004000,
        0xffff    ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0xaa99aaaa,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x80000000,
        0x40004000,
        0x0       ,
        0x0       ,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x0
    };
    constexpr uint32 CoherDestBase2Gfx6[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtMaxVtxIndxGfx6[] = {
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x1000000 ,
        0x1000000 ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SpiPsInputCntl0Gfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SxPsDownconvertViGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 DbDepthControlGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x90000   ,
        0x4       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaSuSmallPrimFilterCntlViGfx6[] = {
        0x0
    };
    constexpr uint32 PaSuPointSizeGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtHosMaxTessLevelGfx6[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsModeGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x100     ,
        0x80      ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtPrimitiveidEnGfx6[] = {
        0x0
    };
    constexpr uint32 VgtPrimitiveidResetGfx6[] = {
        0x0
    };
    constexpr uint32 VgtMultiPrimIbResetEnGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xff      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize1Gfx6[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize2Gfx6[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize3Gfx6[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutDrawOpaqueOffsetGfx6[] = {
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsMaxVertOutGfx6[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScCentroidPriority0Gfx6[] = {
        0x0       ,
        0x0       ,
        0x1000    ,
        0x0       ,
        0x5       ,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xe       ,
        0x10      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    uint32* pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_RENDER_CONTROL, mmTA_BC_BASE_ADDR_HI__CI__VI, DbRenderControlGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_WINDOW_OFFSET, mmPA_SC_RASTER_CONFIG_1__CI__VI, PaScWindowOffsetGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmCOHER_DEST_BASE_2, mmCOHER_DEST_BASE_3, CoherDestBase2Gfx6, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MAX_VTX_INDX, mmPA_CL_UCP_5_W, VgtMaxVtxIndxGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSPI_PS_INPUT_CNTL_0, mmSPI_SHADER_COL_FORMAT, SpiPsInputCntl0Gfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSX_PS_DOWNCONVERT__VI, mmCB_BLEND7_CONTROL, SxPsDownconvertViGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_DEPTH_CONTROL, mmPA_SU_LINE_STIPPLE_SCALE, DbDepthControlGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, PaSuSmallPrimFilterCntlViGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_POINT_SIZE, mmPA_SC_LINE_STIPPLE, PaSuPointSizeGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_HOS_MAX_TESS_LEVEL, mmVGT_HOS_MIN_TESS_LEVEL, VgtHosMaxTessLevelGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MODE, mmVGT_GS_OUT_PRIM_TYPE, VgtGsModeGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_EN, mmVGT_PRIMITIVEID_EN, VgtPrimitiveidEnGfx6, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_RESET, mmVGT_PRIMITIVEID_RESET, VgtPrimitiveidResetGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MULTI_PRIM_IB_RESET_EN, mmVGT_STRMOUT_VTX_STRIDE_0, VgtMultiPrimIbResetEnGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_1, mmVGT_STRMOUT_VTX_STRIDE_1, VgtStrmoutBufferSize1Gfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_2, mmVGT_STRMOUT_VTX_STRIDE_2, VgtStrmoutBufferSize2Gfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_3, mmVGT_STRMOUT_VTX_STRIDE_3, VgtStrmoutBufferSize3Gfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_DRAW_OPAQUE_OFFSET, mmVGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE, VgtStrmoutDrawOpaqueOffsetGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MAX_VERT_OUT, mmVGT_STRMOUT_BUFFER_CONFIG, VgtGsMaxVertOutGfx6, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_CENTROID_PRIORITY_0, mmCB_COLOR7_DCC_BASE__VI, PaScCentroidPriority0Gfx6, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);

    for (uint32  regIdx = 0; regIdx < numRegPairs; regIdx++)
    {
        pCmdSpace = pCmdStream->ReserveCommands();
        pCmdSpace = pCmdStream->WriteSetOneContextReg(pRegOffsets[regIdx], pRegValues[regIdx], pCmdSpace);
        pCmdStream->CommitCommands(pCmdSpace);
    }
}

// =====================================================================================================================
// Initialize several structures with the ClearState values, the Set registers are the same as ContextShadowRange.
void InitializeContextRegistersGfx7(
    CmdStream*     pCmdStream,
    uint32         numRegPairs,
    const uint32*  pRegOffsets,
    const uint32*  pRegValues)
{
    constexpr uint32 DbRenderControlGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScWindowOffsetGfx7[] = {
        0x0       ,
        0x80000000,
        0x40004000,
        0xffff    ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0xaa99aaaa,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x80000000,
        0x40004000,
        0x0       ,
        0x0       ,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x0
    };
    constexpr uint32 CoherDestBase2Gfx7[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtMaxVtxIndxGfx7[] = {
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x1000000 ,
        0x1000000 ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SpiPsInputCntl0Gfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SxPsDownconvertViGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 DbDepthControlGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x90000   ,
        0x4       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaSuSmallPrimFilterCntlViGfx7[] = {
        0x0
    };
    constexpr uint32 PaSuPointSizeGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtHosMaxTessLevelGfx7[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsModeGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x100     ,
        0x80      ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtPrimitiveidEnGfx7[] = {
        0x0
    };
    constexpr uint32 VgtPrimitiveidResetGfx7[] = {
        0x0
    };
    constexpr uint32 VgtMultiPrimIbResetEnGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xff      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize1Gfx7[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize2Gfx7[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize3Gfx7[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutDrawOpaqueOffsetGfx7[] = {
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsMaxVertOutGfx7[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScCentroidPriority0Gfx7[] = {
        0x0       ,
        0x0       ,
        0x1000    ,
        0x0       ,
        0x5       ,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xe       ,
        0x10      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    uint32* pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_RENDER_CONTROL, mmTA_BC_BASE_ADDR_HI__CI__VI, DbRenderControlGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_WINDOW_OFFSET, mmPA_SC_RASTER_CONFIG_1__CI__VI, PaScWindowOffsetGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmCOHER_DEST_BASE_2, mmCOHER_DEST_BASE_3, CoherDestBase2Gfx7, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MAX_VTX_INDX, mmPA_CL_UCP_5_W, VgtMaxVtxIndxGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSPI_PS_INPUT_CNTL_0, mmSPI_SHADER_COL_FORMAT, SpiPsInputCntl0Gfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSX_PS_DOWNCONVERT__VI, mmCB_BLEND7_CONTROL, SxPsDownconvertViGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_DEPTH_CONTROL, mmPA_SU_LINE_STIPPLE_SCALE, DbDepthControlGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, PaSuSmallPrimFilterCntlViGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_POINT_SIZE, mmPA_SC_LINE_STIPPLE, PaSuPointSizeGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_HOS_MAX_TESS_LEVEL, mmVGT_HOS_MIN_TESS_LEVEL, VgtHosMaxTessLevelGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MODE, mmVGT_GS_OUT_PRIM_TYPE, VgtGsModeGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_EN, mmVGT_PRIMITIVEID_EN, VgtPrimitiveidEnGfx7, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_RESET, mmVGT_PRIMITIVEID_RESET, VgtPrimitiveidResetGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MULTI_PRIM_IB_RESET_EN, mmVGT_STRMOUT_VTX_STRIDE_0, VgtMultiPrimIbResetEnGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_1, mmVGT_STRMOUT_VTX_STRIDE_1, VgtStrmoutBufferSize1Gfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_2, mmVGT_STRMOUT_VTX_STRIDE_2, VgtStrmoutBufferSize2Gfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_3, mmVGT_STRMOUT_VTX_STRIDE_3, VgtStrmoutBufferSize3Gfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_DRAW_OPAQUE_OFFSET, mmVGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE, VgtStrmoutDrawOpaqueOffsetGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MAX_VERT_OUT, mmVGT_STRMOUT_BUFFER_CONFIG, VgtGsMaxVertOutGfx7, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_CENTROID_PRIORITY_0, mmCB_COLOR7_DCC_BASE__VI, PaScCentroidPriority0Gfx7, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);

    for (uint32  regIdx = 0; regIdx < numRegPairs; regIdx++)
    {
        pCmdSpace = pCmdStream->ReserveCommands();
        pCmdSpace = pCmdStream->WriteSetOneContextReg(pRegOffsets[regIdx], pRegValues[regIdx], pCmdSpace);
        pCmdStream->CommitCommands(pCmdSpace);
    }
}

// =====================================================================================================================
// Initialize several structures with the ClearState values, the Set registers are the same as ContextShadowRange.
void InitializeContextRegistersGfx8(
    CmdStream*     pCmdStream,
    uint32         numRegPairs,
    const uint32*  pRegOffsets,
    const uint32*  pRegValues)
{
    constexpr uint32 DbRenderControlGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScWindowOffsetGfx8[] = {
        0x0       ,
        0x80000000,
        0x40004000,
        0xffff    ,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0x0       ,
        0x40004000,
        0xaa99aaaa,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x80000000,
        0x40004000,
        0x0       ,
        0x0       ,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x80000000,
        0x40004000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x3f800000,
        0x0       ,
        0x0
    };
    constexpr uint32 CoherDestBase2Gfx8[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtMaxVtxIndxGfx8[] = {
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x1000000 ,
        0x1000000 ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SpiPsInputCntl0Gfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 SxPsDownconvertViGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 DbDepthControlGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x90000   ,
        0x4       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaSuSmallPrimFilterCntlViGfx8[] = {
        0x0
    };
    constexpr uint32 PaSuPointSizeGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtHosMaxTessLevelGfx8[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsModeGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x100     ,
        0x80      ,
        0x2       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtPrimitiveidEnGfx8[] = {
        0x0
    };
    constexpr uint32 VgtPrimitiveidResetGfx8[] = {
        0x0
    };
    constexpr uint32 VgtMultiPrimIbResetEnGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xff      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize1Gfx8[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize2Gfx8[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutBufferSize3Gfx8[] = {
        0x0       ,
        0x0
    };
    constexpr uint32 VgtStrmoutDrawOpaqueOffsetGfx8[] = {
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 VgtGsMaxVertOutGfx8[] = {
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    constexpr uint32 PaScCentroidPriority0Gfx8[] = {
        0x0       ,
        0x0       ,
        0x1000    ,
        0x0       ,
        0x5       ,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x3f800000,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0xffffffff,
        0xffffffff,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x1e      ,
        0x20      ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0       ,
        0x0
    };
    uint32* pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_RENDER_CONTROL, mmTA_BC_BASE_ADDR_HI__CI__VI, DbRenderControlGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_WINDOW_OFFSET, mmPA_SC_RASTER_CONFIG_1__CI__VI, PaScWindowOffsetGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmCOHER_DEST_BASE_2, mmCOHER_DEST_BASE_3, CoherDestBase2Gfx8, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MAX_VTX_INDX, mmPA_CL_UCP_5_W, VgtMaxVtxIndxGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSPI_PS_INPUT_CNTL_0, mmSPI_SHADER_COL_FORMAT, SpiPsInputCntl0Gfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmSX_PS_DOWNCONVERT__VI, mmCB_BLEND7_CONTROL, SxPsDownconvertViGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmDB_DEPTH_CONTROL, mmPA_SU_LINE_STIPPLE_SCALE, DbDepthControlGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, mmPA_SU_SMALL_PRIM_FILTER_CNTL__VI, PaSuSmallPrimFilterCntlViGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SU_POINT_SIZE, mmPA_SC_LINE_STIPPLE, PaSuPointSizeGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_HOS_MAX_TESS_LEVEL, mmVGT_HOS_MIN_TESS_LEVEL, VgtHosMaxTessLevelGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MODE, mmVGT_GS_OUT_PRIM_TYPE, VgtGsModeGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_EN, mmVGT_PRIMITIVEID_EN, VgtPrimitiveidEnGfx8, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);
    pCmdSpace = pCmdStream->ReserveCommands();
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_PRIMITIVEID_RESET, mmVGT_PRIMITIVEID_RESET, VgtPrimitiveidResetGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_MULTI_PRIM_IB_RESET_EN, mmVGT_STRMOUT_VTX_STRIDE_0, VgtMultiPrimIbResetEnGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_1, mmVGT_STRMOUT_VTX_STRIDE_1, VgtStrmoutBufferSize1Gfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_2, mmVGT_STRMOUT_VTX_STRIDE_2, VgtStrmoutBufferSize2Gfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_BUFFER_SIZE_3, mmVGT_STRMOUT_VTX_STRIDE_3, VgtStrmoutBufferSize3Gfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_STRMOUT_DRAW_OPAQUE_OFFSET, mmVGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE, VgtStrmoutDrawOpaqueOffsetGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmVGT_GS_MAX_VERT_OUT, mmVGT_STRMOUT_BUFFER_CONFIG, VgtGsMaxVertOutGfx8, pCmdSpace);
    pCmdSpace = pCmdStream->WriteSetSeqContextRegs(mmPA_SC_CENTROID_PRIORITY_0, mmCB_COLOR7_DCC_BASE__VI, PaScCentroidPriority0Gfx8, pCmdSpace);
    pCmdStream->CommitCommands(pCmdSpace);

    for (uint32  regIdx = 0; regIdx < numRegPairs; regIdx++)
    {
        pCmdSpace = pCmdStream->ReserveCommands();
        pCmdSpace = pCmdStream->WriteSetOneContextReg(pRegOffsets[regIdx], pRegValues[regIdx], pCmdSpace);
        pCmdStream->CommitCommands(pCmdSpace);
    }
}

} // Gfx6
} // Pal
